<%@ page language="java" import="java.util.*,com.hanma.bean.User" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Insert title here</title>
</head>
<body>
<table  border="1" align="center" cellspacing="0" cellpadding="0" width="600">
    <tr align="center" height="50" width="600">
        <td colspan="8">会员列表</td>
    </tr>
    <tr align="center" height="50">
        <td>ID</td>
        <td>姓名</td>
        <td>昵称</td>
        <td>密码</td>
        <td>邮箱</td>
        <td>电话</td>
        <td>状态</td>
        <td>操作</td>
    </tr>

    <%
        List<User> userList = (List<User>)request.getAttribute("userList");
    	if(userList != null && userList.size() > 0){
    		for(User user : userList){
    %>
    <tr>
        <td><%= user.getId()%></td>
        <td><%= user.getUsername()%></td>
        <td><%= user.getNickname()%></td>
        <td><%= user.getPassword()%></td>
        <td><%= user.getEmail()%></td>
        <td><%= user.getTel()%></td>
<%--        <td><%= user.getStatus()==1?"正常":"静止"%></td>--%>
        <td>
            <a  href="update.do?id=<%= user.getId()%>">修改</a>
            <a  href="delete.do?id=<%= user.getId()%>">删除</a>
        </td>
    </tr>
    <%
    		}
    	}
    	String currentPage = request.getAttribute("currentPage").toString();
    	String totalPage = request.getAttribute("totalPage").toString();
    	String prePage = request.getAttribute("prePage").toString();
    	String nextPage = request.getAttribute("nextPage").toString();
    %>
   
    <tr align="center" height="50">
        <td colspan="8">
            <span>当前[<%= currentPage%>]页</span>
            <span>共[<%= totalPage%>]页</span>
            <span><a href="list.do?currentPage=1">首页</a></span>
            <span><a href="list.do?currentPage=<%= prePage%>">上一页</a></span>
            <span><a href="list.do?currentPage=<%= nextPage%>">下一页</a></span>
            <span><a href="list.do?currentPage=<%= totalPage%>">尾页</a></span>
        </td>
    </tr>
</table>
</body>
</html>